<template>
  <div>
    <h3>这是App组件</h3>
    <h3>{{count}}</h3>
    <br><hr>
    <Child @changeCount="changeCount" />
  </div>
</template>

<script>
import Child from '@/compontens/Child'
export default {
  name:'App',
  components:{Child},
  methods:{
    changeCount(value){
      this.count += value
    }
  },
  data(){
    return{
      count:0
    }
  }
}
</script>

<style>

</style>